<template>
  <div class="home">
    <img alt="Vue logo" src="../../assets/logo.png">
    <HelloWorld msg="电磁" />
    <el-button type="primary" @click="gettableData()">主要按钮</el-button>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'

export default {
  name: 'electrter',
  data() {
    return {
      req: {
        "start": "2024/09/30 14:00:00",
        "end": "2024/10/01 14:00:00"
      }
    }
  },
  components: {
    HelloWorld
  },

  methods: {
    gettableData() {
      app.axios({
        method: 'post',
        url: '/data/dataSync',
        data: this.req,
      })
        .then((tabledata) => {
          console.log("tabledata",tabledata)
          // this.$message(res.data);
        })
        .catch(res => {
          //this.$message(res.response.data);
        });
    }
  }
}
</script>
